package com.ny.demo0428;

import java.util.Random;

public class Main {
    public static void main(String[] args) {
        int[] arr = new int[10];
        Random rand = new Random();
        int sum = 0;

        for (int i = 0; i < arr.length; i++) {
            arr[i] = rand.nextInt(100) + 1;
            sum += arr[i];
        }

        double avg = (double) sum / arr.length;
        System.out.println("平均值: " + avg);
    }
}